﻿@{
    ViewBag.Title = "评论";
}
@section header{

}
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <div style="padding-top: 20px; margin-right: 30px;">
            <input type="hidden" name="ID" value="" />
            <table class="form">
                <tr>
                    <th class="formTitle">发布人</th>
                    <td class="formValue">
                        <input id="UserID" name="UserID" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">表ID</th>
                    <td class="formValue">
                        <input id="TableID" name="TableID" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">表名</th>
                    <td class="formValue">
                        <input id="TableName" name="TableName" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">评论内容</th>
                    <td class="formValue">
                        <input id="Message" name="Message" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">评论IP</th>
                    <td class="formValue">
                        <input id="IP" name="IP" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">评论状态</th>
                    <td class="formValue">
                        <input id="Status" name="Status" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

                <tr>
                    <th class="formTitle">名称</th>
                    <td class="formValue">
                        <input id="Name" name="Name" type="text" class="form-control " autocomplete="off" />
                    </td>
                </tr>

            </table>
        </div>
    </div>
</form>

@section scripts{
    <script>
        var baseUrl = "/Sys/Comment/";
        var keyValue = $.request("keyValue");
        $(function () {
            initControl();
            if (!!keyValue) {
                $.ajax({
                    url: baseUrl + "GetFormJson",
                    data: { keyValue: keyValue },
                    dataType: "json",
                    async: false,
                    success: function (data) {
                        $("#form1").formSerialize(data);
                    }
                });
            }
        });
        function initControl() {

        }
        function submitForm() {
            if (!$('#form1').formValid()) {
                return false;
            }
            $.submitForm({
                url: baseUrl + "SubmitForm?keyValue=" + keyValue,
                param: $("#form1").formSerialize(),
                success: function () {
                    $.currentWindow().$("#gridList").resetSelection();
                    $.currentWindow().$("#gridList").trigger("reloadGrid");
                }
            })
        }
    </script>
}